#ifndef __BSP_H__
#define __BSP_H__

#include <stdint.h>      // IWYU pragma: export

#define CONFIG_GPIO_HIGH_BRK_MODE 1
#define CONFIG_GPIO_LOW_BRK_MODE 2


#define CONFIG_HW_ID_UART0  0x0
#define CONFIG_HW_ID_CAN0   0x10

#define ENCODER_TIMER_DIR_DOWN 1
#define ENCODER_TIMER_DIR_UP 2

#define get_uart_id(HW) (HW&0X0f)

#define INVALD_PIO 0xFFFFFFFF

#if defined(STM32F405xx)
#include "bsp/stm32/stm32f4xx_board.h" // IWYU pragma: export
#elif defined(STM32G431xx)
#include "bsp/stm32/stm32g4x1_board.h" // IWYU pragma: export
#elif defined (GD32F30X_HD) || defined (GD32F30X_XD) || defined (GD32F30X_CL)
#include "bsp/gd32/gd32f30x_board.h"
#elif defined (AT32FXXX)
#include "bsp/at32/at32f4xx_board.h"
#elif defined(USE_MEX_CMD)
#include "simulink_sfunc/sim_bsp.h"  // IWYU pragma: export
#endif

#include "bsp/cpu_ticks.h"


#ifndef CONFIG_BOARD_COM_UART
#define CONFIG_BOARD_COM_UART 0
#endif

#ifndef CONFIG_BOARD_COM_CAN
#define CONFIG_BOARD_COM_CAN 0
#endif

#endif /* __BSP_H__ */
